<?php 
header("Content-type:text/html;charset=utf-8");
require_once('./system/dbConn.php');
connect();
$id=$_POST['id'];
$content=$_POST['content'];
//var_dump($_POST);

          $sql = "update comments set content='$content' where cid='$id'";
     $result = mysql_query($sql) or die('sql=$sql,更新失败！<br/>'.mysql_error()); 
     $num = mysql_affected_rows();
  if($num!=1)
  {
    echo "更新失败！";
    echo "<a href= 'myCommentList.php'>返回</a>";
  }
  else
    header("location:myCommentList.php?re=修改成功");
 ?>

